package net.maku.events.service.impl;

import lombok.RequiredArgsConstructor;
import net.maku.events.service.ActivityBriskWalkService;
import net.maku.events.service.ActivityKnowledgeContestService;
import net.maku.events.service.ActivitySnapshotService;
import net.maku.events.service.IndexService;
import net.maku.events.vo.ActivityBaseVO;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: qr
 * @Date: 2025/4/12 14:44
 * @Version 1.0
 */
@Service
@RequiredArgsConstructor
public class IndexServiceImpl implements IndexService {

    private final ActivityBriskWalkService activityBriskWalkService;

    private final ActivityKnowledgeContestService activityKnowledgeContestService;

    private final ActivitySnapshotService activitySnapshotService;

    @Override
    public List<ActivityBaseVO> topActivity() {
        List<ActivityBaseVO> result = new ArrayList<>();
        result.addAll(activityBriskWalkService.topActivity());
        result.addAll(activityKnowledgeContestService.topActivity());
        result.addAll(activitySnapshotService.topActivity());
        return result;
    }
}
